<script lang="ts" setup>
import type { ColumnsType } from 'ant-design-vue/es/table'

const columns: ColumnsType = [
  {
    title: 'ID',
    dataIndex: 'id',
    key: 'id',
    fixed: 'left',
    width: 80,
  }, 
  {
    title: '序号',
    dataIndex: 'num',
    key: 'num',
    width: 80,
    fixed: 'left'
  },
  {
    title: '步骤名称',
    dataIndex: 'name',
    key: 'name',
    width: 200,
    fixed: 'left'
  },
  {
    title: '执行状态',
    dataIndex: 'executeState',
    key: 'executeState',
    width: 100,
  },
  {
    title: '断言状态',
    dataIndex: 'assertionState',
    key: 'assertionState',
    width: 100,
  },
  {
    title: '重试次数',
    dataIndex: 'alreadyRetriesCount',
    key: 'alreadyRetriesCount',
    width: 90,
    ellipsis: true,
  },
  {
    title: '截图url',
    dataIndex: 'screenshotUrl',
    key: 'screenshotUrl',
    width: 100,
  },

  {
    title: '操作',
    dataIndex: 'function',
    key: 'function',
    fixed: 'right',
    width: 200,
  },
]
</script>

<template>
  <ReportDetailsModalTable
    :columns="
      columns.map((column) => ({ ...column, align: 'center' })) as ColumnsType
    "
  />
</template>
